package com.theo.service.impl;

import com.theo.entity.TypeInfo;
import com.theo.mapper.TypeInfoMapper;
import com.theo.service.TypeInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 方涛
 * @since 2021-02-02
 */
@Service
public class TypeInfoServiceImpl extends ServiceImpl<TypeInfoMapper, TypeInfo> implements TypeInfoService {
    @Autowired
    private TypeInfoMapper typeInfoMapper;

    @Override
    public List<TypeInfo> queryFactTypeInfo() {
        return typeInfoMapper.queryFactTypeInfo();
    }

    @Override
    public List<TypeInfo> queryTopicTypeInfo() {
        return typeInfoMapper.queryTopicTypeInfo();
    }

    @Override
    public int deleteTypeInfo(Integer id) {
        return typeInfoMapper.deleteById(id);
    }

    @Override
    public int updateTypeInfo(TypeInfo typeInfo) {
        return typeInfoMapper.updateById(typeInfo);
    }
}
